package com.android.juliomedina;

import com.android.juliomedina.parser.About_actvity;
import com.android.juliomedina.parser.Beachbody_actvity;
import com.android.juliomedina.parser.Business_actvity;
import com.android.juliomedina.parser.Fitness_actvity;
import com.android.juliomedina.parser.PetPeeves_actvity;
import com.android.juliomedina.parser.Reviews_actvity;
import com.android.juliomedina.parser.SongsOfTheDay_actvity;
import com.android.juliomedina.parser.Thoughts_activity;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

/**
 * 
 * @author globussoft
 */
public class MainActivity extends TabActivity {

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		Resources ressources = getResources();
		TabHost tabHost = getTabHost();

		// thoughts tab
		Intent intentThought = new Intent().setClass(this,
				Thoughts_activity.class);
		TabSpec tabspecThought = tabHost.newTabSpec("Thoughts")
				.setIndicator("", ressources.getDrawable(R.drawable.tab_one))
				.setContent(intentThought);

		// Songs of the day tab
		Intent intentSongs = new Intent().setClass(this,
				SongsOfTheDay_actvity.class);
		TabSpec tabspecSongs = tabHost.newTabSpec("Songs Of The Day")
				.setIndicator("", ressources.getDrawable(R.drawable.tab_two))
				.setContent(intentSongs);

		// PetPeeves tab
		Intent intentPetpeeves = new Intent().setClass(this,
				PetPeeves_actvity.class);
		TabSpec tabspecPetPeeves = tabHost.newTabSpec("PetPeeves")
				.setIndicator("", ressources.getDrawable(R.drawable.tab_three))
				.setContent(intentPetpeeves);

		Intent intentReviews = new Intent().setClass(this,
				Reviews_actvity.class);
		TabSpec tabspecReviews = tabHost.newTabSpec("Reviews-By-Julio-Medina")
				.setIndicator("", ressources.getDrawable(R.drawable.tab_four))
				.setContent(intentReviews);

		Intent intentFitness = new Intent().setClass(this,
				Fitness_actvity.class);
		TabSpec tabspecFitness = tabHost.newTabSpec("Fitness")
				.setIndicator("", ressources.getDrawable(R.drawable.tab_five))
				.setContent(intentFitness);

		Intent intentBusiness = new Intent().setClass(this,
				Business_actvity.class);
		TabSpec tabspecBusiness = tabHost.newTabSpec("Business")
				.setIndicator("", ressources.getDrawable(R.drawable.tab_six))
				.setContent(intentBusiness);

		Intent intentAbout = new Intent().setClass(this, About_actvity.class);
		TabSpec tabspecAbout = tabHost.newTabSpec("About")
				.setIndicator("", ressources.getDrawable(R.drawable.tab_seven))
				.setContent(intentAbout);
		Intent intentBeachbody = new Intent().setClass(this,
				Beachbody_actvity.class);
		TabSpec tabspecBeachbody = tabHost.newTabSpec("Beachbody")
				.setIndicator("", ressources.getDrawable(R.drawable.tab_eight))
				.setContent(intentBeachbody);

		// add all tabs
		tabHost.addTab(tabspecThought);
		tabHost.addTab(tabspecSongs);
		tabHost.addTab(tabspecPetPeeves);
		tabHost.addTab(tabspecReviews);
		tabHost.addTab(tabspecFitness);
		tabHost.addTab(tabspecBusiness);
		tabHost.addTab(tabspecAbout);
		tabHost.addTab(tabspecBeachbody);

		// set Windows tab as default (zero based)
		tabHost.setCurrentTab(2);
	}

}